package com.zsc.oj.judge.codesandbox;

import com.zsc.oj.judge.codesandbox.impl.ExampleCodeSendBox;
import com.zsc.oj.judge.codesandbox.impl.RemoteCodeSendBox;
import com.zsc.oj.judge.codesandbox.impl.ThirdCodeSendBox;

/**
 * 代码沙箱工厂
 */
public class CodeSendBoxFactory {
    public static CodeSendBox newInstance(String type){
        switch (type){
            case "example":
                return new ExampleCodeSendBox();
            case "remote":
                return new RemoteCodeSendBox();
            case "third":
                return new ThirdCodeSendBox();
            default:
                return new ExampleCodeSendBox();
        }
    }
}
